﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.IO;
using System.Text;

namespace PageFilter
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            StreamReader sr = new StreamReader(@"E:\Project\JohnCore\PageFilter\HTMLPage1.htm");
            StreamReader sr1 = new StreamReader(@"E:\Project\JohnCore\PageFilter\HTMLPage1.htm");
            string str = sr.ReadToEnd();
            string str1 = sr1.ReadToEnd();
            sr.Close();
            sr.Dispose();
            DateTime bDt = DateTime.Now;
            unsafe
            {
                fixed (char* pDecimals = str)
                    for (char* p = pDecimals; *p != 0; p++)
                    {
                        *p = char.ToUpper(*p);
                    }
                Response.Write("用时：" + (DateTime.Now - bDt).TotalMilliseconds.ToString() + "毫秒<br />");
            }
            bDt = DateTime.Now;
            char[] sc = str1.ToCharArray();
            StringBuilder newStr = new StringBuilder();
            foreach (char a in sc)
            {
                newStr.Append(char.ToUpper(a));
            }
            Response.Write("用时：" + (DateTime.Now - bDt).TotalMilliseconds.ToString() + "毫秒<br />");
        }
    }
}
